
//
//  SevenVC.m
//  yuanjiang
//
//  Created by YuanJiang on 2019/9/19.
//  Copyright © 2019 llbt. All rights reserved.
//

#import "SevenVC.h"
#import "Dog.h"

@interface SevenVC ()

@end

@implementation SevenVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"动态添加方法";
    
    
    Dog *dog = [[Dog alloc] init];
    //默认dog,没有实现eat方法,可以通过performSelector调用,但是会报错
    //动态添加方法就不会报错
    [dog performSelector:@selector(eat)];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
